<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "customer_commu_history".
 *
 * @property string $id
 * @property string $history_date
 * @property string $history_contact
 * @property string $history_result
 * @property string $created_at
 */
class CustomerCommuHistory extends \yii\db\ActiveRecord
{
    public static function getDb()
    {
        return Yii::$app->get('forge');
    }
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'customer_commu_history';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
//            [['history_date'], 'required'],
            [['history_result'], 'string'],
            [['created_at'], 'safe'],
            [['history_date', 'history_contact'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'history_date' => '沟通日期',
            'history_contact' => '沟通联系人',
            'history_result' => '沟通结果',
            'created_at' => '创建时间',
        ];
    }

    /**
     * @inheritdoc
     * @return CustomerCommuHistoryQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new CustomerCommuHistoryQuery(get_called_class());
    }
}
